package com.jg.mapper;

import com.jg.comm.Page;
import com.jg.entity.Book;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author 86130
 * @description 针对表【book】的数据库操作Mapper
 * @createDate 2025-09-01 14:47:09
 * @Entity com.jg.entity.Book
 */
@Mapper
public interface BookMapper {

    //获取书籍列表
    public List<Book> getBookList(@Param("bookName") String bookName, @Param("author") String author);

    //获取数据列表总条数
    public Integer getBookListTotalCount(@Param("bookName") String bookName, @Param("author") String author);

    //获取书籍列表分页
    public List<Book> getBookListPage(@Param("bookName") String bookName,
                                      @Param("author") String author,
                                      @Param("pageNum") Integer pageNum,
                                      @Param("pageSize") Integer pageSize);

    //新增书籍
    public Integer addBook(Book book);

    //删除书籍
    public Integer deleteBook(Integer id);

    //修改书籍
    public Integer updateBook(Book book);
}
